package com.situ.day23.singleton;

import com.situ.day26.Student;

//饿汉式
public class Singleton1 {
    private static final Singleton1 INSTANCE = new Singleton1();
    private Student student;

    private Singleton1() {
        System.out.println("Singleton1.Singleton1");
    }

    public static Singleton1 getInstance() {
        return INSTANCE;
    }

    public static void test() {
        System.out.println("Singleton1.test");
    }
}
